//
//  SHTwoViewController.m
//  通知测试 dome
//
//  Created by 石虎 on 2017/7/22.
//  Copyright © 2017年 shihu. All rights reserved.
//

#import "SHTwoViewController.h"
#import "ViewController.h"

@interface SHTwoViewController ()
//输入要传值的文字
@property (weak, nonatomic) IBOutlet UITextField *TextField;
//开始传值
- (IBAction)startValue:(id)sender;

@end

@implementation SHTwoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}
//开始传值
- (IBAction)startValue:(id)sender
{
    //发布通知----第三部
    [[NSNotificationCenter defaultCenter]postNotificationName:@"labelTextNotification" object:self.TextField.text];

    [self dismissViewControllerAnimated:YES completion:nil];

}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self.view endEditing:YES];
}
@end
